﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdminTypeList.aspx.cs" Inherits="webadmin_AdminTypeList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link type="text/css" href="css/style.css" rel="stylesheet" />
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/lib.js"></script>
    <script type="text/javascript">
        $(function () {
            BindBtn();
            AddTrClass($("#listinfo"));
        })
        function ShowDialog(type, id) {
            var url = "", title;
            switch (type) {
                case 1:
                    title = "编辑权限组";
                    url = "DoAdminType.aspx?type=edit&id=" + id;
                    break;
                case 2:
                    title = "新增权限组";
                    url = "DoAdminType.aspx?type=add";
                    break;
            }
            top.CreateIframe(title, url, 500, 480);
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="conBox">
        <div class="ctrlbar">
            <div class="f-left">
            </div>
            <div class="f-right">
                <a href="javascript:ShowDialog(2,0)" class="toolbtn">
                    <img src="images/ico-add.gif">新 增</a>
            </div>
            <div class="clear">
            </div>
        </div>
        <div class="grid-box">
            <table class="grid-table">
                <thead>
                    <tr>
                        <th class="align-l" style="width:50px;">
                            序号
                        </th>
                        <td class="align-l">
                            名称
                        </td>
                        <td class="align-c">
                            编辑
                        </td>
                        <td class="align-c">
                            删除
                        </td>
                    </tr>
                </thead>
                <tbody id="listinfo">
                    <asp:Repeater ID="rptAdminType" runat="server" OnItemCommand="rptAdminType_ItemCommand"
                        OnItemDataBound="rptAdminType_ItemDataBound">
                        <ItemTemplate>
                            <tr>
                                 <td>
                                    <%#nNum++%>
                                </td>
                                <td>
                                    <%#Server.HtmlEncode(Eval("Name").ToString())%>
                                </td>
                                <td class='align-c'>
                                    <asp:Literal ID="ltlEdite" runat="server"></asp:Literal>
                                </td>
                                <td class='align-c'>
                                    <asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" CommandArgument='<%#Eval("ID")%>'
                                        ImageUrl="images/ico-delete.gif" OnClientClick="return confirm('确定要删除该权限吗?该操作会删除掉该权限下的所有管理员人信息。');"
                                        ToolTip="删除" />
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </tbody>
            </table>
            <div id="noData" runat="server">
                <div class="noDateMsg">
                    没有任何信息！</div>
            </div>
            <asp:Button ID="btnReset" runat="server" Text="" OnClick="btnReset_Click" Style="display: none;" />
        </div>
    </div>
    </form>
</body>
</html>
